Fix compilation with trace enabled

A couple of variables were missing.
Merge pull request #243 from heeen/fix-trace

Fix compilation with trace enabled