fix check_link command for Solaris10.

- '-w' option of grep is not allowed.
- modify to check strictly