Regulatory Compliance with Costly and Uncertain Litigation