Answers of defendants out of the state may be sworn to before any commissioner for this state, or any judge, chancellor, or any justice of the peace, notary public, or the mayor or alderman of any city or town, or clerk of a court of record, in the state or country where such defendant may be, if such officer shall be authorized to administer oaths by the law of such state or country; and the certificate of such officer as to his official character, shall be prima facie evidence thereof.