convert an R list to a BSON object