Porting to Lua 5.2 (unfinished).