Huawei could feature in a US-China trade pact despite being “very dangerous”, says the US president.