ndg: Record initial value of NDF_AUTO_HISTORY correctly

This bug caused starlink applications to ignore any value set for the
NDF_AUTO_HISTORY environment variable.