Thanks for dealing with that. The only potential problem I see with your patch would be when one runs configure with a perverse program name transformation, e.g., --program-transform-name='s/^/$/', introducing a shell metacharacter (or leading/trailing white space!) in the resulting name. In that case, the lack of single quotes around @grep@ would be fatal.
Fixing that is not high priority. Anyone who does that to grep deserves the result :-)