qtgui: fixes to allow QTGUI to build on Gentoo.