Fix matrix.exclude with global envs

Fixes travis-ci/travis-ci#1237.