Don't depend on boost::thread when not using libANA

backported from master