Guard against potential configure bug wrt HAVE_GETWD