Fix ImportError in newer versions of python-gobject