NMake: Use UTF-8 with BOM if supported by nmake

Fixes: #21792
6 files changed