Check if nproc is present and fall back to /proc/cpuinfo otherwise.