qtgui: fixes to allow QTGUI to build on Gentoo.
Merge branch 'maint'