Fix a non standard use

document.url could be not defined. Examples on Chrome 33 Debian