Fix export syntax of $GREP_OPTIONS

Fixes #2641, #2642
Merge branch 'patch-1' into dev