bpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744)

(cherry picked from commit 85e102a2b090dd693d0801ae2edb9660cfa0f281)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
6 files changed