Helmholtz Free Energy of an Anharmonic Crystal: A Green Function Approach