Fix broken c-style casts
You cannot cast something that doesn't inherit from KisTool to KisTool, but c-style casts don't know that.