solving the library linking problem of bamtools