turn on static linking and optimization for linux build