throw overflow error if NaN or infinity is passed in as an JSON value (fix #25)