Fix Travis failure for Python 3 because of xrange