Fix export syntax of $GREP_OPTIONS

Fixes #2641, #2642
Merge pull request #2643 from mcornella/patch-1

Fix export syntax of $GREP_OPTIONS