build: enable LTO and _FORTIFY_SOURCE with optimization

If building with optimization enabled, enable LTO.
1 file changed