Breakup of shearless invariant tori in cubic and quartic nontwist maps