Fix QtCore version detection on Mac.

There might still be cases missing, but at least the framework scenario
works properly now.