core: fix build with autotools (add main.c)