Fix https://github.com/julianhyde/optiq/issues/286, "Error casting MongoDB date".