For molecular substances exhibiting harmonic and nonharmonic vibrations, we present a first-principles approach to predict enthalpy differences between phases at finite temperatures, including solid-solid and melting. We apply it to the complex hydride LiBH4. Using ab initio molecular dynamics, we predict a structure for the high-T solid phase of lithium borohydride, and we propose an approximation to account for nonharmonic vibrations. We then predict the enthalpy changes for solid-solid transition, melting, and an H-storage reaction, all in agreement with experiment.