Donald Trump has said it is a "great thing" that the people of the UK have "taken back their country" in voting to leave the EU.