Bash: check if `brew` command exists

last version failed on OS X, hopefully this will work on all systems