gi: fix wrong conversion way

GType may be 64bit unsigned integer. NUM2UINT is 32bit unsigned
integer on 32bit environment.