Fixes #12098 Only dynamically load the libGLESv2 library if OpenGL ES is enabled.

The nvidia driver version 334.21 has included the libGLESv2 library.
Users upgrading to the newer drivers were seeing mythfrontend segfault
because it was dynamically loading this library and then using it
incorrectly (because mythtv had been build with opengles disabled)

(cherry picked from commit 5c7bd7f127e9ef2cb91de2bf0f82a35b7262d423)

Slight modification to accomodate the 0.26 codebase.
Allow compilation on 10.9.

Selective backports from 0.27
Merge branch 'fixes/0.26' into isdb_eit/0.26