add some compatibility for emacs v23