allow specifying LUACFLAGS, LUALDFLAGS manually, fix compilation with outdated shells