additional fixes for lib build