rewrite and refactor enable-mac-fullscreen. Avoid errors on other OSs