Added std::thread and std::mutex support with c++11 on osx