Use strtof_l, strtod_l and asprintf_l if available

This avoids the hacks introduced in the previous commit, if those
functions are available.