Fixed Bug #3568: Build fails with WITH_OPENGL=ON
Merge pull request #2412 from arunjvs:master