Fix new frame bug in Emacs 23

New frames could not be created in Emacs 23 before this patch