On the vibration of elastic bodies having time-dependent boundary conditions