Eliminate a use of a ctype.h function.

That way, we avoid locale-dependent behavior.

Change-Id: I429fde961dc7cb61013756a663d6cd511f19ca70
Reviewed-on: https://code.wireshark.org/review/4845
Reviewed-by: Guy Harris <guy@alum.mit.edu>