[C] Fix multiple build errors/warning on Mac OS X