fix for respond only recognizing link elements in the head

- look for <link> elements anywhere in the document
- set head to the parent of the first <link> element