Fixed build script to use global value as an out variable.