Supply -fcommon to enable a build with recent LLVM. This fixes the build on FreeBSD 13+. While we are at it, add missing dependencies.