compatibility with Lua 5.2 and 5.3-alpha