Build fixes for Qt 4.7 and qmake