Section 30. A witness who is detained in jail under section forty-nine of chapter two hundred and seventy-six because of his inability to furnish sureties shall be allowed as a witness fee such sum as the court shall order, but not less than one dollar and fifty cents for each day of his detention.