Use boost::mutex instead of std::mutex because MinGW.