Add support for thread-specific storage on Windows.