Hamiltonian monodromy via geometric quantization and theta functions