generate version string more reliably.