Fixed OS check in Thread.h and Thread.c to properly check for __APPLE__ to detect OS X.