Fix calls to 'stat' on OSX  - If being built on Darwin ensure we use the BSD
format (and not GNU format) for stat.