Use new Swig cast macro instead of a home-brew one