More Mac OS fixes for Qt5.