Handle non-numeric version strings

Fixes #2.
Fix building against current Nix master