Temperature dependence of the energy bandgap of two-dimensional hexagonal boron nitride probed by excitonic photoluminescence