another std::thread compatibility fix