Applied patch to enable logging from Javascript view functions. Closes COUCHDB-59. Thanks to Chris Anderson for the patch.