fix parsing of versions with more than one digit (major-version > 9)

This fixes RT #116016;