fix: windows dll multithreading crash
Windows dlls don't fully support standard C++ thread local storage (TLS) without additional code. This caused access violations in multithreaded client applications.
The fix uses synchronized access to static storage which doesn't rely on TLS.