fixed compilation of bson_field.h #527

Took fix from mongodb/mongo@e0efa267 but didn't take that whole commit.