Lua 5.2 support by replacing setfenv