Support building the tile generator statically
This simplifies server-side deployment.
Technically this does change behavior of the STATIC_BUILD option somewhat, but given the build failed with that option enabled before anyway, I don' think that's a real problem.