Fix linker error seen on some Linux distros (e.g. Suse).

Thanks to Tim Wood for finding the cause of the problem.