A banana duct-taped to a wall has sold for $6.2m (£4.9m) at an auction in New York.