Some changes to adapt to emacs-w64