Fix PHP-687: Avoid premature casting during MongoDate arithmetic