Fix compilation, and bring 32/64 bit variants more in line.