Improved Emacs version checking for advice