libdl should also be linked to binary
on stock android, pthread_cancel and phtread_setcancelstate doesn't exist