BLD: fix issue with version strings reported by @cel4 in gh-1897.

[ci skip]