Propagate --version fix to release/1.10 branch.

See #550 for original pull request.