Dynamics of a two-level atom in a Kerr-like medium