fixed compile error when statistics are not enabled

Thanks to Liviu Chircu for reporting them