Yes, I think open-source it, make it clear that they don't own it, and make an agreement with them that any further work you do on it in company time is also open-sourced.
Anyway, never mind what they might or might not benefit from it, the most important thing is how YOU are benefitting from it.
My approach is to put in my best, even if I am underpaid, because pushing your own limits, you increase your own capabilities. Compare this to some slacker who puts in the minimum and never improves. So having increased your own capabilities and also accumulated a load more selling-points on your CV, you're in a much better position to get a better job or to negotiate a better salary.
New York... when civilization falls apart, remember, we were way ahead of you. - David Letterman