Fix compatibility with Zsh arrays

* Zsh arrays starts at 1
* Zsh arrays have to be declared before being assigned
Merge pull request #192 from np/zsharrays

Fix compatibility with Zsh arrays