Added wrapping code for libmongoose