add DEBUG_THREAD_SELF to allow use of DEBUG_TRACE with thread IDs on both normal pthreads platforms and PTW32