Fix for IE's lack of `location.origin`.