Update utils.py

Python 3 removed the distinction between int and long, does not compile on Py3