Log only in modern browsers

Logging is useful. It is broken in older browsers and causes bugs. We're whitelisting the browsers we like now.