Add various fixes to resolv ImportErrors at travis.