Made it work with Emacs major versions < 24