Fix initialization problem with QOffscreensurface in GlobalContext