fix #167, make ncpus work in linux