American wins gold in men's ski halfpipe