Coastal and riverine ecosystems as adaptive flood defenses under a changing climate