test_child was declared to be build always but only actually built when
cmocka was available, which is not the case on all platforms.
We can either 1) move the test_child outside the HAVE_CMOCKA or 2) only
append test_child to check_PROGRAMS when cmocka is available which is what
the attached patch does.
I'm fine with either option. Thanks for opinions/review.