Man accused of slapping toddler on plane appears in court