Four-membered rings in silica and aluminosilicate glasses