EU agrees new legislation to protect whistleblowers