Ultraviolet Extinction by Interstellar Dust in External Galaxies: M31