Invariant mass distributions for heavy quark-antiquark pairs in deep inelastic electroproduction