If a complaint is laid by any person other than a police officer for an offence punishable under this Act, and the complaint is dismissed or withdrawn, the court may, if it thinks fit, order such person to pay to the defendant in addition to any costs, such compensation for loss of time or otherwise as the court thinks reasonable.