Consistent estimation of agent-based models by simulated minimum distance