The basic international law compendium was included in what's called the Yogyakarta principles, where international jurists got together in Indonesia and tried to clarify international law by in a sense codifying it, although it's not been adopted by any legislature. The Yogyakarta principles are easily available online, if someone wants to have a look at that.
The definition used there is for gender identity. It uses the word “including” and adds many other things to it, but the definition I'll be proposing to you is the first part of that definition and the part that is consistent with Canadian jurisprudence, I believe.