Incidence algebras as algebras of endomorphisms