Changed library order

Otherwise ubuntu seems to have issues with undefined refrences.