Fixed some more PyQt5 portability bugs.

Leo build: 20140909140354