An Energy-Efficient MAC Protocol Employing Dynamic Threshold for Wireless Sensor Networks