bsdgrep: Work-around for segmentation fault.

Fix by David Carlier.

Obtained from:	HardenedBSD
PR:		167921
MFC after:	1 month