Magnetocrystalline anisotropy of light rare-earth cobalt compounds