partially revert 1a5841b for mirb

Fix compilation fail caused by GNU Readline and `ISPRINT`.
Also add missing `unsigned char` cast.