bson Synchronization

Updated the code to keep in line with changes made to bson.