Avoid problems caused by zsh globsubst option

When the shell has the globsubst option enabled,
the function definition throws an error, and the
hook never gets defined.