Make the plugin compatible with Python 3 (Closes #1)