Former Barnsley defender Declan John has joined Scottish outfit St Mirren on a short-term deal.