Fix browser detect edge case

In rare cases, navigator.userAgent and navigator.appVersion are undefined. Browser detect attempts to return `'unknown'` when these are not provided, but an error was thrown when these were undefined. Defaults are now provided.