change the way to determine the CMSSW version in CMG_PAT_V5_18_from-CMSSW_5_3_22

This PR changes the way to determine the CMSSW version. It uses the environmental variable "CMSSW_VERSION" instead of "CMSSW_BASE".