Two French citizens held in Iran since 2022 have been released and are on their way to France, President Emmanuel Macron says.