Fixes to make jpattern work under linux