fix stat on OSX