Working around some of the SWIG internal issues with enums