We can use the member functions of NSURL to achieve this instead.
Pull request: https://github.com/WebKit/WebKit/pull/10728
<rdar://problem/106291594>