On using cold baryogenesis to constrain the two-Higgs doublet model