Fix linking flags