GCC 4.4 compilation fixes (strict aliasing)
Log thread id when _MULTI_THREADED macro is defined.