BF: guard against broken PyQt import

We may have picked up a broken PyQt that correctly imported, for example if
we have imported a Python 3.3 PyQt from Python 3.2; check we do have the
attribute we need for getting PyQt versions.