fix #22027: preferences dialog not modal on mac osx