Fix export syntax of $GREP_OPTIONS

Fixes #2461, #2462