Fixed linking on ubuntu