Redirecting output when linking libs