appinsights seems to monkey patch even if explicitly disabled, so instead just only load it if needed
Also gracefully deals with the times when git isn't in the PATH