Fix missing GL defines on OSX
Fix GCC warnings