I would always mention those project in my CV.
I would always mention those projects applying for a position for the following reasons:
- It proves that you are genuinely interested in the topic and probably has been interested for long time.
- It shows you experience in the domain of your application.
- There can be thousands reasons why you would like to invent your own wheel: another language, another format, a better optimization etc. Even the reason "I just wanted to try it on my own" would already do, especially in case of an open-source project where you don't have to optimize your performance against project budget!
Turn potential caveats into your advantages.
I would provide short description of your projects enabling comparison to established projects, something like "THis project implemented XXX as in project YYY, but has the advantage that ZZZ is implemented this way" etc. This way you show your knowledge of the existing established solutions and your awareness about those while implementing your libraries.
Hiring managers are normally non-technies and won't ask you about the reasons during screening or first (phone) interviews to avoid being engaged into a highly technical discussion. They would rather pick the key words from your resume -- those are the well-known and established technologies in your area (so maybe it is even a good idea to italicize them) -- and judge your resume just by counting them.
Whenever you see a technie on the other side of your interview table -- just don't hesitate to explain the reasons behind your decision to implement some libraries or tools. Even your ignorance about existing frameworks is absolutely pardonable -- now you know them, and even more -- you know how to re-build them from scratch. And you learned that all without being paid, on your own.
Even if the interviewing engineer has a completely different opinion about the same reason, the ability to discuss and to support your opinion is what is valued most during the interview. You can learn programming against existing frameworks in 2-3 weeks just by reading books and doing tutorials, but knowing how to implement from scratch will diminish this time to 2-3 days...