autotools: only state the version once

The key seems to be to use defines for that part,
rather than shell variables.