Use Agg backend in tests (fixes #120)