Nothing says that the civil disobeyer needs to go out of their way to turn themselves in to the authorities if the act of civil disobedience isn't known by the police. If I plan an act of civil disobedience like say sitting in the road to protest something, and it turns out no one drives on that road and the cops never come, I was still breaking the law. You have to accept the consequences of your civil disobedience, and I'm sure the people sheltering slaves/jews knew that if they were caught there would be consequences that they would have to accept.