use #[thread_local] on Windows
auto merge of #17652 : thestinger/rust/thread_local, r=cmr