Where a parent of an infant, or any other person at law liable to maintain an infant or entitled to his custody, has abandoned or deserted the infant, or allowed the infant to be brought up by another person or by an institution at that or another person's or institution's expense for such length of time and in such circumstances as to satisfy the court that the parent of the infant, or the person at law liable to maintain the infant or entitled to his custody, was unmindful of his duties towards the infant, the court shall not make an order for the delivery of the infant to the person who was so unmindful of his duties unless the court is satisfied that:
(a) that person is a fit person to have the custody of the infant; and
(b) it is in the interests of the infant that he should be delivered to that person.