Fix link error when optimization is disabled (ffs is not provided by mingw)