Adjust URLs to be protocol-relative where necessary.

Closes gh-392