Add configure test for {set,get,end}usershell() availability
Initialise msg to avoid potential NULL pointer dereference

The NULL pointer dereference in the PAM module should not occur due to
the relationship with the rc value that is handled alongside it. This
change mostly silences the compiler and protects from future changes.