mac build fixes...
mac fixes, proper build.sh support in a proper, sane order