adapt to Lua 5.2