You could also render the mesh without shadow, render a second time with a white plane that receives shadow, load those pics into some photoshop-like app, mask the object in pic 2 with the alpha from pic 1, blend the white part with the shadow into the intended background-pic using "darker" (so the white doesn't affect the pic in the least), adjust opacity and / or brightness, contrast etc (if it's to hard, use a bit of blur).
It's really amazing what you can do with blending different layers into each other with ps or any other app that allows for this.