nsswitch: Fix build check logic