ZSH compatibility fix

when curl downloads the data the variable content is empty even if we
specify the value in export section. Moved it to global variables to
make it look consistent and work correctly.