Fixes for Qt5 build