Fix dll loading process in newer Python on Windows (#17191)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/17051.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17191
Differential Revision: D14138427
Pulled By: kostmo
fbshipit-source-id: 9f207105161ad0312eb09fd86072afd5f22de785