Fix handling pre/build data when minor/patch is missing in Mix.Version

Closes #1681.