A French citizen imprisoned in Iran for more than 880 days has been freed, according to President Emmanuel Macron.