detect whether we need -lrt or not