fix wlink to be buildabe on 64-bit host
a few 32/64-bit build fixes