If LC_NUMERIC unsupported do not inadvertently change locale.

On Windows, we should be able to use _create_locale() and _free_locale()
but using them results in unresolved symbols linking on mingw 4.8.
Calling setlocale with fallback value of "" results in changing locale
to system-defined. With this change, on OS where LC_NUMERIC changing is
not supported we call with NULL, which makes the call passive.
If LC_NUMERIC unsupported on OS, serialize XML with LC_NUMERIC=C.