Modify BSON date encoding and decoding.