fixed MacOSX build
fixed shutdown with close window icon