Fix huge number of undefined reference errors under Linux.