A fix for Emacs 24.4 and higher.