Consistency of Causal Inference under the Additive Noise Model