Changed the order of the library and object files for Ubuntu gcc compatibility.