Provided a better way to define number of cores on linux.