Refactor Travis build condition.