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

This workaround is likely no longer required.