Iran's foreign minister criticised US President Donald Trump's threat to withdraw from the nuclear deal on Thursday.