[trunk] Fix compilation errors when JPWL and/or MJ2 are build