Improve build system: Making installed examples executable.

Fixes #1866.