The invention provides a compound of formula I: or a pharmaceutically acceptable salt thereof, wherein the variables X, Y1-Y5, R1, R2, R3, R4, and Het have the meaning as described herein, and compositions containing such compounds and methods for using such compounds and compositions.