build: fixes, cmake lib configuration