Tweaks to handle issues with Emacs 24.2 on OS X