A characterization of the generalized LiƩnard polynomial differential systems having invariant algebraic curves