Adapt to Emacs 24.
Some minor fixes after migration to Emacs 24