The key word here and in the eyes of the law is reasonable. Just because you're in a shed doesn't mean you automatically have the right to stab the burglers with a pitchfork, same as you don't automatically have the right to stab someone if you were in a kitchen where knifes are readily available.
If the burglars presents some type of physical threat, for example were trying to stab you with a knife, a reciprocal attempt at stabbing would be for more justified and reasonable.
It's common sense really.