$K_L to K_S$ regeneration in the KLOE detector