change install script
change cocoa-emacs dependent code to fix error when emacs with no-window