A South American trade bloc has ruled that Peru is failing to curb illegal gold mining and mercury trafficking.