Patch for OSGi compatibility.