Fix Python 2 compatibility.
Merge pull request #2 from ProgVal/fix-python2-compat

Fix Python 2 compatibility.