A comparison of the Higgs sectors of the CMSSM and NMSSM for a 126 GeV Higgs boson