After commit 2482648a, a GNU grep option is just passed unconditionally to `grep` in general. This patch fixes the test for platforms where `grep` is not GNU grep.