Mali beat Tunisia 1-0 at the Africa Cup of Nations in a Group F game which ended in controversy after the referee blew for full-time prematurely.