build: Fix linker errors on Debian/Ubuntu