The appeals board is empowered to and shall allow, as a credit to the employer to be applied against his liability for compensation, such amount of any recovery by the employee for his injury, either by settlement or after judgment, as has not theretofore been applied to the payment of expenses or attorneys’ fees, pursuant to the provisions of Sections 3856, 3858, and 3860 of this code, or has not been applied to reimburse the employer.