Check for __readfsdword at configure-time

Recent versions of mingw-w64 have moved this definition to a header
included by this file, so checking simply for GCC would cause a multiple
definition error. We should instead check for this function's
availability at configure-time.

These changes are released under MIT/X11 license.
(cherry picked from commit 4f763604178d5fd84f4ec5a40b5f2edab7354dfc)

Conflicts:
	configure.in
Replace underscores with hyphens when reading system locale

The locale descriptions in
<mono/metadata/culture-info-tables.h:culture_name_entries> use 'xx-yy'
format, where most current systems use 'xx_YY', including Mono itself in
<eglib/src/gmisc-win32.c:g_win32_getlocale>. In normalizing the system
locale for comparison, we should switch any underscores for dashes.

Mono used to do this, but commit
be532638f5e2160272ccf32e7a39ba7b2301a65b removed this behavior, which
causes System.Globalization.CultureInfo.CurrentCultureInfo to always
point to the invariant culture on systems with LANG similar to xx_YY.

These changes are released under MIT/X11 license.
(cherry picked from commit b727b34091c98af5f38aa335c6d9390124998b1a)