You could always test it My guess would be a no though, beens as they are supposedly un-wearable in vanilla minecraft
I'd say no because to the game it only works if you're wearing a pumpkin, not a jack-o-lantern (which is what the headless horseman mask is)
It should not work when looking at an Enderman. The reason for this is that the Wearable flag removes the black pumpkin outline that you get when wearing a normal pumpkin. Endermen become angry when your cursor crosshair moves over them, and the reason pumpkins prevent accidentally angering is because the black pumpkin face covers the crosshair. As a result, the lack of the black areas in the Mask causes this function to become nonexistent.