Fix pathname bug in IE.