Fix compilation when stats are not enabled.

If macro `STATS_NEEDED` is not defined, then the file does not correctly compile.
This change fixes the problem.
Merge pull request #164 from yp/patch-1

Fix compilation when stats are not enabled.