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.
Merge pull request #2325 from matthew-brett/deal-with-broken-qt4

BF: guard against broken PyQt import