Determining monodromy groups of abelian varieties