EarthJustice gets court to restrict sonar in whale areas