Fix 64-bit compilation issues