Adapted to python3 with PyGObject

This fixes issue #8 for users with python3 and PyGObject installed.