Performance of the MAGIC telescopes under moonlight