The prime minister told Parliament he was aware of Mandelson's ongoing friendship with the late sex offender when he was appointed as US ambassador.