Wire BSD IO functions in runtime

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