Fixed a bunch of warnings and a build failure

ec_gtk.h and ec_curses.h should be included in ec_interface only if HAVE_GTK and HAVE_CURSES are defined