fix some mac compile issues, fixup some gcc-on-darwin code (even though premake forces clang at the current time)