Use builtin `command` instead of `which`

The command `which` is not always available depending on the
environment. We can use the builtin command `command` to pull the path
and be less likely to miss attributes.