Fix (some) Emacs24 compatibility issues.