build: mozilla: detect (and fix) zsh build problems

(integrated from trunk branch change 66d534b by Todd Whiteman <toddw@activestate.com>)