Except AttributeError when checking for gtk3 backends

This fixes a problem with the checks if gtk3 backends requirements are met at build time. Old versions of `gi` module don't have the respective methods used there and raise an AttributeError. See #1949.