[Tsan] Fix the thread_name tests to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D5855