Nonlinear waves in solids with slow dynamics: an internal-variable model