Another approach to checking if linux or osx -- tell it, like in Avahi.