The ultraviolet absorption spectrum of CO - Applications to planetary atmospheres