Bug fix #143: Move setlocale(LC_NUMERIC, "C")

Move setlocale(LC_NUMERIC, "C") to a better place, in hope to fix #143.
Thanks to hiciu for reporting!