Use proper ctype instead of own hacks, prevent name clashes