Adaptive and Channel-Aware Detection of Selective Forwarding Attacks in Wireless Sensor Networks