TS-1926 Change Lua detection to look for lua_getfenv(), which is not
available in Lua v5.2 and later (and our code needs it, for now).