Equation of State for Dark Energy in Modified Gravity Theories