x86_64 assembly pack: make Windows build more robust.

PR: 2963 and a number of others