for some reason, the linker needs --no-as-needed for both libdl and libpthread. closes #4 thanks to @tomsawyer for discovering this. the proposed -pthread change was not needed though, and this is a good thing since it seems not portable.