Specht property of varieties of graded Lie algebras