US President Donald Trump has taken credit for Britain's decision not to use Huawei for its 5G network.