Densification of magnesium and calcium metaphosphate glasses