The effect of the counter ion on M–H···H–X (X=O, N) interactions in crystalline transition metal hydrides