use if/else instead of switch

in case awk was compiled without --enable-switch