Fix crash in JNI code when OpenVDS Java objects are garbage collected.
Static thread_local variables were not correctly initialized in the GC thread or in any other thread different from the main thread. Maybe related to a bug in the Visual Studio compiler.