bson Synchronization

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