install peerDependencies from top

The simplest possible change to ensure that peerDependencies get installed properly – be sure to install them at the top level if they're included at the top level. Fixes #6323.