use #[thread_local] on windows

This workaround is likely no longer required.