Ahead of his visit to Cuba, US President Barack Obama cracked jokes with the communist country's most loved comedian in a surprise exchange broadcast online.