Multi-threading bugfix, DLL could be used from other threads before the main thread initializes it.
Thanks to user xor88 for reporting this one.

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>