A Generalization of Favard's Theorem for Polynomials Satisfying a Recurrence Relation