Backport Travis fixes from master