Fix: use lua_getglobal for better lua compatibility

LUA_GLOBALSINDEX does not exists i, lua 5.2

Signed-off-by: Gregory Detal <gregory.detal@uclouvain.be>