A man suspected in at least one of the shootings that killed at least 49 people at two mosques has appeared briefly in court.