fix definition of `ad-advised-definition-p' on Emacs before 24.4