fix Makefile FLAGS inheritance, lua ld link, lua include in *.c

to force the use of lua 5.1, I think we must use autoconf...