use better strategy to check the need for --no-as-needed link flag.
Merge pull request #6 from gotcha/master

use better strategy to check the need for --no-as-needed link flag.