zsh: rewrite a function with $OSTYPE

Fancier and a bit more portable (I guess) than calling uname.