Shear sum rule in higher derivative gravity theories