fix some emacs24 compatibility issue