update osx build.sh
Only build abstract socket code on linux
osx: lots of misc build fixes