build: replace which with Bash command built-in