Restored the old frame maximization code. The new one from Emacs 24.4 is not reliable.