Hyperfine splitting in positronium and muonium