v8: add option for shared library

Some tools won't work when v8 is compiled with library=shared. Anyway,
homebrew should provide this option, since shared objects are almost
always a bad idea.