add more linker flags for dynamic linking against the build environment

Uncomment the last of the copied lines, it appears they are all needed.