Mac OS fixes for Qt5.