Register an object with a C member function with Lua.