Large deviation techniques applied to systems with long-range interactions