Update vsync on resize, and before first FBO.

May take care of #4440.
Merge pull request #6337 from unknownbrackets/vsync

Update vsync on resize, and before first FBO