fix build pbc (via cmake); fix build @mac