Symmetry algebras for superintegrable systems