Remove dependency on ctype.