An equation of state for methane in the gas and liquid phases