Near-infrared photometry of carbon stars in the Sagittarius dwarf irregular galaxy and DDO 210