Ultraviolet spectrophotometry of the galactic globular cluster M5