Photon dominated regions in the spiral arms of M 83 and M 51