Mingw compatibilty (with Posix threads)
more reliable std::mutex checking,
auto-enable Boost for mingw without pthreads