changed check for old BSON implementation