Calif. farmer sentenced to prison for $340K crop fraud