Fix a typo from commit 660e0d80ae (internal/CheckCompilerFlag: rely on common configuration, 2022-01-12, v3.23.0-rc1~124^2~1) that caused locale environment variables to not be restored after they are set during the check.
660e0d80ae
Extract configuration step from the CheckCompilerFlag command to enable to share it with future CheckLinkerFlag implementation