[MacPlatform] Fixed password lookup logic for Uri's without paths

Fixes bug #14740