travis: port fixes from 2.3.x branch