thread: Use explicit wide type when shifting > 32 bits