Initialise the number of threads to the number of cores in the machine (#170).