get the build script get_ncpus function to work on more systems