Perfect and imperfect strangers in social dilemmas