Define get_nprocs for OSX

get_nprocs is not an OSX function. So we have to find the number of
cores in another way.  We then define it as get_nprocs for OSX.