Work around a bug in boost::thread<1.51