Isn't there something in the copyright rules about "can be mistaken" where two companies might have similar names / product names as long as there is no risk of mistaking one for the other?
Edit: that said I guess one can avoid a lot of hassle by changing anyway.
In this specific case I doubt you could make the argument that the two things are in separate domains and unlikely to be confused. Lego has sold programmable Lego sets since 1987 and even had their own programming language "Lego TC Logo". Present day they still sell programmable Lego sets under the Lego Mindstorms NXT brand.
(Not that this would ever reach that stage. GitHub will receive a DMCA notice, they will take the project down and that will be the end of the story.)
Edit: I just went through all of the lego trademarks you linked (good call) and none of them are even close to matching a description/category for this library.
Here's a link to the current release with cross-platform binaries: https://github.com/xenolf/lego/releases/tag/v0.1.0
No runtime dependencies, but the code is still difficult to audit due to depending on external libraries at some unknown versions.