US economy posts largest job gains in eight months in June