configure.in: Work for term-mode running in Emacs