remove end binaries during test make clean
older versions of glibc require explicit -lrt
merge build fixes for test code