When Cousin hits, say to her "hitting is not OK" or "hitting hurts DD." Things along those lines - say it firmly, then swiftly move on to a fun distraction for her, like "now, let's see if we can find that pig/rattle/shaker/whatever"

See how that goes. That way they both get the same message, and you're attacking the problem, not MIL/SIL's opinions.