Patch for Trusty development branch

Related to travis-ci/travis-ci#2983

@BanzaiMan Except f9d162b (9.4-beta work in progress), I'll directly integrate the other commits into master branch.
@GrahamCampbell Thanks for catching this :) 
Fixed in 2153fd852a8ac64492f0b3449dab595a1f76e289.