Trump says Iran war largely to blame for Republican midterm losses