make libd buildable as standalone lib