updating tests to link to the correct libs
Merge pull request #1064 from stan-dev/feature/issue-1062-make-libstan-dependencies

fixes #1062. updating tests to link to the correct libs