fix linking errors

only order of libs were changed, i get linker errors without this change.