Gold gains as dollar weakens amid mixed US data