X-ray illumination of the ejecta of supernova 1987A