Metis4: build shared lib and add tests.