portably detect number of CPUs.