Zim is from an advanced alien race and he knows how to build things out of just about anything [even if what he builds is something completely useless or somehow extremely dangerous]. Just because he didn't arrive with one doesn't mean he didn't make one already.