build-sys: enable gcc Link Time Optimization when optimization is enabled