Add function to set hostname on osx.