Not sure, but I think wstrlen(pwidechar) is the same as strlen(pwidechar).
They are both referenced in the source to FPC_PWIDECHAR_LENGTH.
So you could change the wstrlen to strlen.
Otherwise adding this to the top of unit uPSRuntime seems to make it compilable in Win32.
function wstrlen(p: PWideChar): SizeInt; external name 'FPC_PWIDECHAR_LENGTH';