Replace pthread with boost::thread