stringify Inf, -Inf and Nan correctly