Ensemble inequivalence in systems with long-range interactions