It's currently decided at build time depending on whether webkit2 build is enabled or not. That makes imposible to build both webkit1 and webkit2 using the same libWebCore.
Created attachment 91477 [details] Patch
Committed r85188: <http://trac.webkit.org/changeset/85188>