build: use AM_SILENT_RULES conditionally

It's not supported by older automake versions.