Rework frontend.c and make it possible to compile without HAVE_MENU
defined again