Fixes linking for tests and examples.
Merge pull request #7 from arpg/fix/test_example_linking

Fixes linking for tests and examples.