Suppose you have the integral
$$i \int^\infty_{-\infty} L_M(t) dt$$
and that $L_M$ contains two poles: when $t>0$ the pole lies above the t-axis and when $t<0$ the poles lies below the t-axis. Therefore you can rotate the contour from the real axis to the contour going from $i\infty$ to $-i\infty$. This path can be parameterized as $z=i\tau$ where $\tau$ is from $\infty$ to $-\infty$:
$$i \int^\infty_{-\infty} L_M(t) dt=i \int L_M(z) dz= i\int^{-\infty}_{\infty} L_M(i\tau) id\tau= \int^{\infty}_{-\infty} L_M(i\tau) d\tau \\\equiv-\int^{\infty}_{-\infty} L_E(\tau) d\tau $$
However, textbooks write instead:
$$\int^{\infty}_{-\infty} L_M(-i\tau) d\tau \equiv-\int^{\infty}_{-\infty} L_E(\tau) d\tau $$
so they get the sign wrong (or I got the sign wrong).