References to dllimported globals in static data initializers lead to
undefined-symbol linker errors. We need to resolve the indirection
manually at runtime.
I went with an extra LLVM pass for Windows targets when using
`-fvisibility=public`, and scanning the initializers of all global
variables (well, only thread-global ones). The problematic pointers in
the initializers are nullified and initialized at runtime early via a
CRT constructor (working with -betterC as well).