tests: fix karma url check to use global __karma__, not window.__karma__ which fails on nodejs