Make a solid colour layer of the background and place above your background layer, then in Photoshop, select subject, mask and refine to get some of the stray hair and make a new layer with the subject and place it over the solid colour layer and the shadow is gone. More complicated images might...