Further PyQt4/PySide compatibility fixes.