Installing an ungrounded outlet as a replacement is actually permitted. And even if it's "illegal", it is not really dangerous. The reason being, you can only connect 2-prong cords into those, unless you cut the ground pin on a 3-prong cord, but that's another story!
If you make sure you strip and loop the wires properly (with a nice C shape that should close and form an O when you tight the screw terminal), there will be no problem or danger.