Rewrote CMake to scan for libraries instead of relying on gcc to link