Queens Park Rangers have signed defender Aaron Hughes on a short-term deal until the end of the season.