Replaced deprecated luaL_reg with newer luaL_Reg