Only modify lto.exports.def when contents have changed.

Patch by Greg Bedwell.