Makefile.am: Fixes for building with/without optional components

Make build with --disable-pam work again. And enforce that we have
all the optional components when doing a 'make distcheck'
gkm: A testing reliability fix