Reconciling Thermodynamic and State Definitions of Entropy