Fixed Tls initialization problem

Visual Studio optimization skips GetTlsIndex class constructor execution in release builds, due to this class is not used anywhere. So the previous code has never initialized tlsIndex variable with anything. Such behavior sometime caused the crashes due to error code was not saved into unallocated TLS. 
I've made the explicit calls of GetTlsIndex methods to force class instance creation.
p.s. You may see it yourself how TlsGetValue() fails each time by running the release build under MS Application verifier.