Implement and use locale-independent strtod function