fix lua 5.1 makefile on the fly