Fixed linkage problems in Ubuntu precise