Support Windows earlier than Vista

GetFinalPathNameByHandle was introduced in Vista

Since p can now only be NULL or ret, no need to
strdup it