delphi: Older versions of Delphi lack TThread.CurrentThread

Go back to the original WinAPI function for this on Windows.