This addresses the "small caveat" issue mentioned on #7531 that affects all python versions, by making sure that both site.py's and sysconfig.py's copies of _getuserbase() have the same code.