Fix `make dist` to support versions with more than 2 digit groups

The recent 1.2.1 release ended up having VERSION set to 1.2.1.1 in the
Makefile. With this patch the rebuilt tarball has the correct VERSION
value.

Reported by Sedat Dilek.