Lua 5.2 fixes

few trivial changes to make the tests work with lua 5.2