automake subdir-object mode needs check for -c -o

Older automake versions (at least 1.13.1) will complain if we asked for subdir
mode and we did not verify that both -c and -o flags work (AM_PROG_CC_C_O)