Can a non-instrument rated safety pilot log PIC during an IFR flight?
No

The way that both pilots can log PIC is that the pilot using a view limiting device is logging PIC as sole manipulator and the safety pilot is logging PIC because he is acting PIC and a required crew member. 

If the flight is operating under an instrument clearance then the acting PIC must be instrument rated. If only the pilot with the view limiting device is rated then he is acting PIC and is the only one eligible to log PIC. The safety pilot is also not allowed to log SIC as a required crewmember without an instrument rating while operating under IFR.  

If you are in actual IMC then you shouldn't be logging anything and they other guy shouldn't be wearing a view limiting device.

If you want the PIC time ask your friend to fly VFR or get yourself an instrument rating.