Qt 5: Build fixes for Qt 5 platform

Recent changes to the develop branch broke Qt 5 support.