Bugfix: order of library linking fixed