Trust Based Approaches to Counter Selective Attacks on Wireless Sensor Networks