Build versioned DB functions and link to $libdir