British Foreign Secretary Boris Johnson has appealed to US President Donald Trump not to pull out of the Iran nuclear agreement, saying the deal had weaknesses but they could be addressed given time.