more reliable std::mutex checking,
auto-enable Boost for mingw without pthreads