OS X: Workaround for regression in Qt 5 that causes pressing the Esc key to close the entire window instead of the current completion popup

See https://bugreports.qt-project.org/browse/QTBUG-41806