Test during configuration whether the linker accepts --no-as-needed.
Pass as_needed_flags to link commands.
Merge pull request #105 from yallop/detect_as_needed

Detect during configuration whether the linker accepts --no-as-needed