Constraints on the formation of the globular cluster IC 4499 from multiwavelength photometry