Fix compile errors on 64-bit systems