Linking fixes

Some linking fixes, taken from Debian. These additional links now resolves every symbol in the compiled binaries.

I'll do another pull request for a build option to use system GLEW