Universal test of unsetopt command

`which` can output undesired output on solaris (see #300).

According to http://stackoverflow.com/a/7522866/189431 this should work in "bash, zsh, ksh and sh (as provided by dash)".