only add -ldl for Linux