Barnsley have signed Northern Ireland international winger Paddy McCourt who joins the club until the end of the season.