gold closes higher on weaker dollar, al-qaida threat