Use setmode() instead of _setmode()

Looks like Cygwin / MSVC declare it that way, and it still works on
MinGW32 cross.
Fixup previous commit

Now, it looks like this breaks Cygwin again.  Have to figure out what's
going on.
Really fix setmode this time

Thanks to Khaled for spotting it.
Merge check-internal-symbols.sh and check-exported-symbols.sh
Bug 59637 - check-exported-symbols.sh & check-internal-symbols.sh fail on mips/mipsel