Bug 1081606: Don't call toArray with zero-size arrays. r=rnewman

Reviewed on Bugzilla...