Section 12C. The benefits provided for a widow and children under section twelve B shall be paid in like manner to the widow and children of a deceased employee who had completed two years of creditable service and had been married to such widow for one year at the time of his death and who having had the right to become a member of the retirement system failed to become or elected not to become such a member; provided, that there is paid into the annuity savings fund of the appropriate retirement system an amount equal to the deductions that would have been made from his annual compensation had he become a member of the retirement system at the time of his entry into service together with accumulated interest to the date of such payment.