Fix problem with linkers that don't support the '-E' flag
The '-E' flag is necessary with GNU ld so that all dynamic symbols are properly exported, and things like typeid() work across DSO boundaries. However there are other linkers out there which don't accept this option. This commit checks for this and drops the option in that case. Let us hope those linkers do the right thing, or wait until someone complains...