Fix panic when getting global LGI fields

A panic will occur when using lua_getfield() as LGI
will attempt to find the value as a typelib. This breaks
the attempt to report an incorrect LGI version and
causes a crash.