lua_newlibtable was passing a size_t to lua_createtable instead of int.