Real-Time Optimization with Modifier Adaptation Based on Dynamic Gradient Estimation