Compiles on mac os x. woo!
Fixes to merge moai-core stuff and the beginnings of the SDL fixes