The Drygas Functional Equation on Abelian Semigroups with Endomorphisms