Use xrange when running Python 2.x