use lua_getglobal instead of LUA_GLOBALSINDEX (5.2 compat)