use #[thread_local] on Windows