build.sh: get number of CPUs on OSX too

Just a small fix for something that's way of, but every little bit helps I suppose.

The linux way (reading /proc/cpuinfo) doesn't work on OSX.