Dumper: fixed dumping INF an NAN

JSON does not support INF and NAN