Non-stoquastic Hamiltonians in quantum annealing via geometric phases