(d) Whenever the governing body of any county or municipality to which there has been conveyed any real property, capital improvement, or personal property subject to such lawful conditions, restrictions or limitations shall by ordinance, in the case of a municipality, and by resolution, in the case of a county, determine that said real property, capital improvement or personal property can no longer be used advantageously for the purposes for which the same were acquired by the county or municipality, said county or municipality may, by ordinance or resolution, authorize the sale or exchange pursuant to section 13 of this act of the interest of the county or municipality in said real property, capital improvement or personal property. Whenever the county or municipality, by resolution or ordinance, as the case may be, determines that property, which has been acquired by purchase, gift, devise, lease, exchange or otherwise for a nominal or no consideration for a specific purpose, or subject to lawful conditions, restrictions or limitations as to its use, can no longer be used for the purposes for which acquired, it may offer or reconvey said property to the original grantor or his heirs for a similar or no consideration, prior to other disposition pursuant to section 13 of this act.