Fix numDifferent for Mac OS X