bson: convert custom marshalers to new API