Prefer ggrep for grep invocations that use GNU extensions.

This allows ruby-build to work on Solaris 11.1.