Compute the version when it's new enough, not when the test program failed.

This fixes the Linux build here, and should not affect Windows.