build system: Fix FreeImage support on Linux