fix egl config chooser bug

This PR is used to fix issue #8160