Dynamic shakedown in elastoplastic structures with general internal variable constitutive laws