Improved CocosDenshion ios/macosx compilation