Make gg_replace compatible with OSX