A suicide car bomb has exploded in the Somali capital, Mogadishu, killing at least 12 people near the security service headquarters.