If a target has C++ sources, then use g++ to link it (fixes #162). Removed SONAME, it's not relevant for dlls and was unused anyway.