Fixes for running emacs in console.