use wrapper to set LUA_PATH variable to fix #3036

Here is an approach to fix #3036.
Yeah, I guess some people would argue that this change introduces an impurity. I don't know lua or the (lua) build system enough to say whether this has any practical downsides. I once tried to do something similar to python, and it was not agreed to be a good solution.

CCing some people that might be interested (according to git log): @peti @jwiegley