Some fixes for the build script on Windows (#18681)
Summary:
Fixes https://discuss.pytorch.org/t/pytorch-build-from-source-on-windows/40288/13?u=peterjc123.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18681
Differential Revision: D14711039
Pulled By: soumith
fbshipit-source-id: f7e1a94b163064c055670b2925cd4502e7773599