Follow /bin/sh style of variable exporting.
bug#2926: make BuildLineArray() dynamic