Use luaL_newlib for Lua 5.2 and avoid setting global even for 5.1