Fix plugin linking on darwin