make the "-Wl,--as-needed" flag optional

as there is not much harm done if it is not used but it may cause the
build to fail if it is present (read: it causes _my_ build to fail),
it defaults to OFF.