fixed js syntax error with extern @:initPackage classes with empty package

It was generating invalid "var " leading to "var var " resulting code which is a syntax error in JS.