Make travis configuration generic.

See https://github.com/travis-ci/travis-ci/issues/1201