Newcastle winger Shane Ferguson has extended his loan spell with Birmingham until the end of the season.