Python 3 fix for Travis CI