A model of cell migration within the extracellular matrix based on a phenotypic switching mechanism