Fix 64-bit shifts so they are consistent with 32-bit versions.