OpenCPN compilation crash if OpenGL is not present.

As said in the title... some preprocesor controls are missing, that commit aims to add those.