Fix misuses of ctype.h calls.