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