Keep a shower cap in your pocket or if you can't afford one, a large plastic bag. Some people tuck their head between their knees - difficult to walk, but can keep the hair dry.
How about carrying a pac-a-mac in your bag ? Yes I know they have been around for ages and aren't the height of fashion, but in an emergency they can be handy