avoid exception on node, where navigator isn't defined, fixes #16663