CSHARP-995: Make ToJson behavior more backwards compatible.