Improve portability by adding #include and type enhancement

Added #include<stdlib.h> to provide calloc() to eliminate compiling error.

Changed typeof mxt_menu()::menu_input from "char" to "unsigned char" to eliminate
compiling error in some compilers.