Fixed library linking due to change in gcc requiring libs to come after object files