A mechanism for the strain-induced nucleation of martensitic transformations