Nature of the chemical bonding in D3h [MH3M]+ cations  (M = Be, Mg)