An Extension of a theorem of Nirenberg and Application to Semilinear Weakly Hyperbolic Equations