Adding head link only for HTML requests

This pull request is based on the tracker item http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30722