The prime minister says that Labour politicians courting the comedian a decade ago had not been aware of his crimes.