Fix linking for platforms with stricter ld (Ubuntu 12.04)
Fix 'test-ex1' dependency so it builds ex1