[opengl] Fix BSD problem which does not define __APPLE__

Fix opengl on bsd which does not have __APPLE__ defined as 0.
freeglut from 2.0 to at least 2.8 relies on that define.
Fixes [GH #1070].