Fix .collections.dicts shims to work with mapping classes other than dict