Added conditionals based on emacs major version 24