Fix detecting Safari by using the useragent gem