Navy sonar that harms whales and dolphins was improperly approved, US court finds