Patch which makes the module work in Python 3