(b)if such person is detained in a jail under sub-section (5) of section 144, on a certificate of the Inspector-General of Prisons, and if such person is detained in a lunatic asylum under the said sub-section on a certificate of any two or more of the visitors of such asylum that he is capable of making his defence,