64-bit compile fixes