Add support for building v8

Change-Id: I81dfbfe8a5ad68b339d252a87fdf6ec8353cecc1
Reviewed-on: http://review.couchbase.org/44274
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>