Optimal control for a hyperbolic problem in composites with imperfect interface: a memory effect