Set number of threads when compiling to number of cpus.