...well, you may not be able to claim the PIC hours outside the USA. But that doesn't change the fact it is completely legal there. The logbook entry should be annotated to indicate you were safety pilot and include the name of the handling pilot. The handling pilot should claim the equivalent hrs as simulated IF and annotate their entry with the name of the safety pilot.