Move registering of enums from global.lua to C++