fix linking on 32 bit systems

No nice solution, but a fix in sync with the rest of the code. Better would be to really handle linker options in PTHREAD_LDFLAGS or something alike. Adding CFLAGS to the linker line really is ugly.