Fixed ordering of libraries so that it will compile on linux