Fix parseHttpHeaderAsNumber to return undefined instead of NaN (#2734)