Fixed link flags in linux to fix memory problems