Use TRAVIS_BRANCH only in non pull requests

If `TRAVIS_PULL_REQUEST` is true, `TRAVIS_BRANCH` will always be master.