Fixed linking errors with old versions of ld