cpp: fix automake dependencies