Build: Link to libpthread and libdl on linux