Check for g++, not gcc and fix linking on Raspberry Pi

We actually need g++, not gcc. Also on the Pi the OpenGLES libs where
missing.