build: fix SunOS and AIX build with autotools