Clean os detection.
Update to support osx.