change $cores to $NUMBER_OF_PROCESSORS

for cygwin compatibility
smarter processor-related settings