Variation in sex allocation plasticity in three closely related flatworm species