Fix os detection for MacOSX