Merge pull request #3938 from RosettaCommons/vmullig/no_thread_local
Replace an instance of thread_local with THREAD_LOCAL.
The thread_local keyword is not supported by all compilers. We use a custom THREAD_LOCAL macro which is defined as thread_local in those compilation environments that support the keyword, and as nothing in those that do not.