Fixes #3950: Fix bogus AM_CONDITIONAL

Custom patch from ticket.