Interpretation of the Galactic Center excess and electroweak phase transition in the NMSSM