Add :toTable for JS objects in Lua