JavaScript: Browser detection (is bad, absolutely, but)