First cast the conditional to an int64 so it works on 32-bit platforms.