osx compilation

this is mostly to abstract out gl includes and fix minor little C errors, then i moved ios stuff to ios dir and created osx dir

the osx stuff doesnt work, but it does compile. i tested compilation of ios and it works.