Enhance version generation on win32

Change-Id: I7b4e46e276c22d093993a08b6d3bdbdf714f584b
Reviewed-on: http://review.couchbase.org/33232
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>