Funding for defense startups has ballooned in recent years as militaries scramble to modernize.