Afroman wins legal battle over songs mocking US police