workaround emacs24.4 api change