How to compute the thermodynamics of a glass using a cloned liquid