Export the HDIST_IN_BUILD variable

The variable needs to be exported, so that it propagates into subscripts.
Otherwise it is only defined inside the build scripts, but not when you call
the actual Python script where this variable is checked.

From "man bash":

       When  a  simple command other than a builtin or shell function is to be
       executed, it is invoked in a separate execution environment  that  con‐
       sists  of the following.  Unless otherwise noted, the values are inher‐
       ited from the shell.

       ·      the shell's open files, plus  any  modifications  and  additions
              specified by redirections to the command

       ·      the current working directory

       ·      the file creation mode mask

       ·      shell  variables  and  functions  marked  for export, along with
              variables exported for the command, passed in the environment

The last bullet point explains the issue. As such, the HDIST_IN_BUILD couldn't
have worked before, but it probably isn't tested that often to be noticed.