build: fix examples compilation when EXESUF is not empty

Due to a wrong substitution doc/examples is not added as a prerequisite
for the objects of the example programs. This results in compiler error
due to the non-existing output directory.

Bug-Id: 636

Signed-off-by: Janne Grunau <janne-libav@jannau.net>