Tidal modulation of two-layer hydraulic exchange flows