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.
Merge pull request #812 from ColdPie1/master

Fix getting current system locale