Added compatibility for Emacs 23 and automatic dependency managing.