build: only whole archive on static v8 builds

Closes #6629