QCD equation of state with almost physical quark masses