Implement Travis workaround

As discussed in https://github.com/travis-ci/travis-ci/issues/2470#issuecomment-47533725.