Crack identification in rods and beams under uncertain boundary conditions