Fixes for PyQt5 Qml support

test_pyqt5_qml.py is working now, but on OSX requires a hacked version of qt5 to work around https://bugreports.qt-project.org/browse/QTBUG-33285. I have tested on Windows and it works with Qt5.1.0 and the latest PyQt5.1 snapshot.