Added support for building static library with MSVC.

Change-Id: I8dcb6d143527bcaca1df12c727516f8ee0b1b2a1
Reviewed-on: http://review.couchbase.org/29754
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>