Refactor travis build condition.