use --as-needed just on linux, since *bsd way is broken... (patch from Diego Pettenò...