A helicopter belonging to the United Nations mission in Somalia has been captured by al-Shabab after it landed in territory held by the armed group.