get correct number of cores info in MacOSX

no /proc file system in MacOSX. use sysctl to return correct number of
cores to speed up building.

h/t yenliangl
Merge pull request #41 from atomicspaceindian/kitkat

get correct number of cores info in MacOSX