Redo _eglInitSurface() so it can be used with all surface types.