After the recent backport in 64e09957, building for Windows on ARM fails; backport two other commits to fix that.