"Improve the XP workaround"

While this hackfix allows us to treat .Net and native program in the
same way, it uses undocumented behavior and broke the x64 build. There
should be a perfect way to unify x86 and x64.