Close #22370: Windows detection in pathlib is now more robust.