use #[thread_local] on windows