Fixed linking order in linux.