Use mkChar + CharacterVector, new[] + delete[]

This should hopefully work around the build errors we were seeing before.