fix linking flags