Add backward compatibility for node's `URL` api