Energy Optimization in Wireless Sensor Networks under Dynamic Spectrum Access Using Adaptive Listening