Fix build and library classpath errors