emacs: support xterm title in linux and macosx