Make windows build scripts cmake-compatible

Change-Id: I2b78915c2d794f18fcad551850fb8a596e4963ff
Reviewed-on: http://review.couchbase.org/43699
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>