Fix regression in inspect() function
window.inspector may be undefined (introduced in b22c2e790500b4359d3d70e1e27c3fc870d39e2a commit)