elixir: fixed detection of homebrew installed erlang

If `/usr/local/bin` is in the users `.zshrc` or similar custom config, but not in `sh`'s PATH, Erlang is not detected because it can't find `erl`..
If we take the return value of `which 'erl'` instead of just calling `erl` from sh, it works!