On Lattice Constructions D and D' from q-ary Linear Codes