title: $cookies.get() gives undefined although document.cookie contains the value
body: <p>In the following code, <code>xsrfCookie</code> is <em>sometimes</em> undefined. I've measured it at about 20% of the calls.</p>
  
  <p>This only seems to happen in MacOS Safari and on iOS in Safari en Chrome. I am using Angular 1.5.6.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$http.get('some_url')
    .success(function() {
      var xsrfCookie = $cookies.get('XSRF-TOKEN');
    });</code></pre>
  </div>
  </div>
  </p>
  
  <p>Setting a breakpoint before or after xsrfCookie and logging <code>document.cookie</code> or even <code>$cookies.get('XSRF-TOKEN')</code> consistently shows the expected XSRF token.</p>
  
  <p>I can only imagine this has something to do with the XSRF token from the GET being set asynchronously, in parallel to the success function, but I can't find anything in the <code>angular.get()</code> code that would suggest this.</p>
  
  <p>Is there anyone who has run into this issue? </p>