Changes to get everything working smoothly on OS X emacs-nw 24.2.1