Fix incorrect type-casting of signed to unsigned.

These incorrect type-casts were introduced by 3cb817b8.
Blindly type-casting to please the compiler is bad!
Merge pull request #1441 from jtanx/typecasting

Fix incorrect type-casting of signed to unsigned.
Don't call g_type_init for glib versions >= 2.35
Remove Win32 byte-order swapping in UniFromEnc

Reference: 513d4f79ed811dc44b8611aabfa9113276fd44a9
It seems that iconv has been updated since then, or something has changed so
that the correct value is returned without byte-order swapping.
Win32: Find GResourceProgramDir before InitSimpleStuff in scripting main
Merge pull request #1439 from jtanx/glib-version

Don't call g_type_init for glib versions >= 2.35
Merge pull request #1442 from jtanx/encoding

Remove Win32 byte-order swapping in UniFromEnc
Merge pull request #1443 from jtanx/win32-noui-init

Win32: Find GResourceProgramDir before InitSimpleStuff in scripting main