Fix an issue in the `kernel_running` function of the JS tests,

This fix allows the JS test to be run against a remote server
with a higher than LAN latency.  This bug in our testing
framework was exposed when running `iptest js/widgets --url`
against tmpnb.

@rgbkrk