Fix compiling on OS X

Clang on Mac OS X 10.8.4 has std::thread, using the MinGW hack generates compiling errors.