Clean up rogue git env vars in case this is running in a git hook, refs #1832