Patch for Python 2.7 Compatibility

This patch ensures that those of us plebes still using Python 2.7 are able to use this very well-written library. The tweaks I've proposed are relatively straightforward, and they retain the same level of Python 3.0 compatibility as before.