Phase stabilization of mode-locked lasers