EU agriculture ministers have announced a €500m (£365m) aid package after thousands of farmers protested on the streets of Brussels.