strings.h: Avoid overflows in the string hash functions