Man arrested for allegedly exposing himself to children at public library