ec: fix left shift overflows on WIN64 build