Iran's president said Tehran wanted a deal with the U.S. before November's midterm elections, contrary to President Trump's claims.