Vacancy-engineered nodal-line semimetals