Update to work with Lua5.2 and 5.1.