Allow runtime to be built with C++ on AIX (mono/mono#17672)
* Allow runtime to be built with C++ on AIX
Many AIX/PPC/BE specific codepaths didn't do casting properly,
since C++ is much stricter than C about pointer typing.
Also specify the C99 format macros early as possible, since
inttypes may get included before eglib gets a chance to set the
macros.
Also explicitly use -pthread, since not using it is the cause of
many libstdc++ crashes on AIX.
* Oops, should have been that define instead
* Suggested changes from Jay on style
* Remove unneeded cast
Commit migrated from https://github.com/mono/mono/commit/
a3f4def8b6951fed5c248bd1875e90a7ab748d15