Support for using the pthreads TLS API, rather than ELF __thread vars
OS X support