updated prolog build script featuring lib support