using __thread on windows, pthreads tls on lin/mac