You should be able to avoid the XPCOM goop and use `Services.cookies`