Turning C structs into Lua tables