The US president has joked that he and German Chancellor Angela Markel have got one thing in common - they have both been wiretapped - allegedly - by former president Barack Obama.