Accurate multiconfiguration Hartree-Fock calculations of isotope shifts in C I and C IV