fixed host detection for OSX