If pygobject is installed, but not the gobject introspection bindings for gtk, it throws a RuntimeError, not an ImportError, and we need to catch that.
Merge pull request #1939 from mdboom/gtk-test-without-x11

GTK error, failed building on command line