fix passing link flags to the generated library