fix custom URI handling in Qt5 for Mac OS

see bug https://bugreports.qt-project.org/browse/QTBUG-34801