Fix wrong window size when restoring maximized window when compiled with lazarus