Does photon production in heavy-ion collisions depend on the equation of state?