Replace deprecated luaL_openlib() by luaL_register()