Register c++ to lua.