Optimal risk sharing with background risk