Modified to allow compilation in CMSSW_5_X or CMSSW_6_X