do wlib fixes to compile on 64-bit host