patch travis_fold and travis_nanoseconds to make it possible to test travis_helper.sh off travis