gold rises as dollar weakens, making ninth yearly gain