You could pass legislation that requires corporations not to do harmful activities in other countries if these activities are illegal in your country. If a corporation does such an activity abroad it would still be prosecuted as a crime in your country. If a corporation doesn't want to subject itself to such accountability, it would have to stop doing business in your country.