Don't clone with --depth 1 when GIT_TAG set.

This seems to cause the tags not be pulled and then checkout
of the tag will fail
(cherry picked from commit 15ad6a426dda583b83adb1c1342c848da1a52634)