I recommend you do NOTHING, thats the way the code was for yearsssssssssssssss, it was likely legal when installed and maybe Grandfathered in by your local authority??????? In those days for 120/240 volt single phase three wire you only ran 3 wires to the outbuilding, 2 Hots and Neutral, just the same as the utility ran the twisted triplex 3 wires to your home. Then the Neutral was wired to a suitable GroundING Electrode and Neutral and Ground busses (if it even had two) were tied together.
But do as you please, I wouldnt be too anxious to raise any red flags i.e. dont ask dont tell and keep under the radar. Sure as you ask some bureaucrat and bring it to his attention he may call the SWAT team and the EPA and OSHA and run out and shut you down lol
PS Im always preaching do it right and safe, but while I believe the new 4 wire system to be better, the old 3 wire arent any great hazard in my opinion provided correctly installed and good earth grounding BUT IF A NEW INSTALLATION GO WITH THE CORRECT MODERN 4 WIRE
My opinion only, your choice now