TorchCFlags.cmake: Add a test for __thread presence