Use Agg as matplotlib backend.

Default backend may not work without X server.