You might be able to get away with just adding spacers if your 5-speed axle is long enough, since you only need a couple of mm of axle protruding beyond the dropout face. That extra axle length doesn’t actually have any function since the wheel is secured by the squeezing of the dropout flats between the locknuts and quick release.