Don't construct function objects directly in boost::thread constructor as some compilers can't handle that.