Revert "Minor WIN32/POSIX bug in resolve_origin()"

This reverts commit c9985fc695dce0f7d71abbbcc7d8245f7c1ab2dd.