Only hook emacs-kill-hook when interactive.