gold ekes out modest gains on spain debt downgrade