Add automatically generated version information. Fixes #541.