Causality and the threshold anomaly of the nucleus-nucleus potential