Lyapunov matrices approach to the parametric optimization of time-delay systems