Thermodynamic functions of molecular hydrogen from ab initio energy levels