The influence of molecular dynamics on divertor detachment in TCV