Fix util support for Python 2