Deal with number of CPUs according to joblib's conventions.