The construction of MDS self-dual codes from generalized Reed-Solomon codes