use wrapper to set LUA_PATH variable to fix #3036

Here is an approach to fix #3036.