Fixing the linker library flags (need to be at the end it seems)