Sure, but even then if contributed code is part of a collective work, the copyright act still requires a work for hire agreement.
Section 101 says:
A “work made for hire” is—
(1) a work prepared by an employee within the scope of his or her employment; or
(2) a work specially ordered or commissioned for use as a contribution to a collective work, as a part of a motion picture or other audiovisual work, as a translation, as a supplementary work, as a compilation, as an instructional text, as a test, as answer material for a test, or as an atlas, if the parties expressly agree in a written instrument signed by them that the work shall be considered a work made for hire.
Yeah, that is indeed the legal definition in the US of a work-for-hire.
As is pointed out though, for non-employees (contractors) there's an enumerated list of categories that that can be applied to. Writing software isn't in there. Although software and a web site designs might be considered an audiovisual work in some cases. Games and multimedia software are clearly audiovisual works. Accounting software, maybe not. Backend scripts, probably not.
The second clause of the definition should probably be updated by Congress to reflect modern realities. However, as it has not been updated, an explicit copyright transfer is needed, or some form of licensing agreement. A lot of specialists for hire will insist on a license instead of an outright copyright transfers because they sure are not going to give away their core work permanently to one party, short of a buy out. With either a copyright transfer or licensing contract it doesn't need to be a work for hire, that issue is irrelevant, the contract is written to cover what you actually need.
What surprises me is how many startups are not even aware of at least including a "work for hire" clause when bring on software developers.