Strategies for Optimal MAC Parameter Setting in IEEE 802.15.4 Wireless Sensor Networks: a Performance Comparison