osx: delay version computation on macOS builds
Before this patch, HGVER would be evaluated at the beginning of the make
execution, and would be unset because build/mercurial/ doesn't exist yet
at that point. Now we compute the version after the `make install` run
has completed.
This is backported to stable from
8626b44516c1, but that revision had an
error in the shell invocation syntax.
(binary:application/octet-stream)