fixed compile errors in agmfast.cpp, fixed test errors in test-gviz.cpp