Effect of magnesium and spermine on the aggregation of bacterial and mammalian ribosomes