libc: fix left shift of a signed integer