Fix for atof(nan) on some windows compilers.

On some windows compilers function <code>atof</code> for input nan returns <code>0.0</code> instead of <code>nan</code>.