add TLS Wrapper to support Older OS X platforms.

This adds a minimal wrapper for Thread local variables to support OS X 10.6 (yeah I needed it)