Fix crash when requesting QGuiApplication::platformNativeInterface()